home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
program
/
4cmp22o.zip
/
INTS.4TH
< prev
next >
Wrap
Text File
|
1994-08-13
|
843b
|
30 lines
\ Interrupt writing assist functions
\ Copyright (C) 1991 by Thomas Almy.
\ Permission is granted to registered users of ForthCMP to sell or distribute
\ computer programs incorporating the compiled contents of this file.
\ Code useful for interrupt handler writing
\ Load at start, before program
10 HEX
\ New assembler code ( CS override typically needed )
H: JMPF ( addr -- ) 0FF C, 2E C, , ;
H: PUSHF 09C C, ;
H: CALLF ( addr -- ) 0FF C, 1E C, , ;
CODE set-handler ( seg offset intnumber -- )
SI POP AX POP DX POP BX POP
DS PUSHSEG BX DS >SEG
25 # AH MOV 21 INT ( set interrupt vector call )
DS POPSEG SI JMPI END-CODE
1 2 IN/OUT
CODE get-handler ( intnumber -- seg offset )
35 # AH MOV 21 INT ( get interrupt vector call )
BX AX MOV BX ES <SEG
RET END-CODE
0A = #IF DECIMAL #THEN